(function (window, undefined) {
  var jQuery = function (selector, context) {
    return new jQuery.fn.init(selector, context);
  };

  jQuery.fn = jQuery.prototype = {
    add: function () {
      console.log("add");
    },
    remove: function () {
      console.log("remove");
    },
    init: function () {
      console.log("init");
      return this;
    },
  };

  jQuery.fn.init.prototype = jQuery.fn;

  //添加扩展(静态、实例)方法【demo】

  //传入{methodName:function(){}}
  //   jQuery.extend = jQuery.fn.extend = function (obj) {
  //     for (var item in obj) {
  //       this[item] = obj[item];
  //     }
  //   };

  window.jQuery = window.$ = jQuery;
})(window);
